﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data;
using System.Data.Common;

namespace MINERP.DAL.Statistics
{
    public class OpenOrderAreaDAL
    {
        public static DataSet GetAreas(DateTime startDate, DateTime endDate,int statType)
        {
            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("GetOpenOrderArea");

            db.AddInParameter(dbCommand, "@startTime", DbType.DateTime, startDate);
            db.AddInParameter(dbCommand, "@endTime", DbType.DateTime, endDate);
            db.AddInParameter(dbCommand, "@statType", DbType.Int32, statType);
            return db.ExecuteDataSet(dbCommand);
        }
    }
}
